﻿@if (Model.RelevancesState == EditState.Preview)
{
    <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/videos/EditRelevances/" + Model.Id)" ExamineType="Operation.EditVideoRelevanes" OnClickRevoke="OnRevoke" />
}

@if (Model.RelatedOutlinks.Any())
{
    <CnGalWebSite.Components.Containers.MiniModeContainer>
        <CnGalWebSite.Components.Containers.MasaTitleContainer Icon="@IconType.Link.ToIconString()" Title="外部链接" Outline Collapable>
         <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaAlert Type="AlertTypes.Warning" Color="tertiary">
                    以下为外部链接，与本站没有任何从属关系，本站亦不对其安全性负责
                </CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaAlert>
            <div class="row">
                @foreach (var item in Model.RelatedOutlinks)
                {
                    <div class="mb-3 col-12">
                        <CnGalWebSite.Shared.MasaComponent.PC.Entries.Templates.Default.RelevanceOtherTip Model="item" IsVideo/>
                    </div>
                }
            </div>
        </CnGalWebSite.Components.Containers.MasaTitleContainer>
    </CnGalWebSite.Components.Containers.MiniModeContainer>
}

@code {
    [Parameter]
    public VideoViewModel Model { get; set; }

    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }
}
